const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    host: '0.0.0.0',
    port: 3000,
    proxy: {
      '/api': {
        target: 'http://localhost:8080',
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/api'
        }
      },
      '/vr-tryon': {
        target: 'http://localhost:8080',
        changeOrigin: true,
        pathRewrite: {
          '^/vr-tryon': '/vr-tryon'
        }
      }
    }
  },
  publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
  productionSourceMap: false,
  configureWebpack: {
    devtool: 'source-map'
  }
})
